package com.dragon.mmochat.model.gang;

import java.io.Serializable;

import com.dragon.mmochat.model.enumType.MmochatGangSkillType;

public class MmochatGangSkill implements Serializable {
	private static final long serialVersionUID = -5659070463360290170L;
	private MmochatGangSkillType type; // 技能类型
	private int level = 0; // 技能等级

	public MmochatGangSkillType getType() {
		return type;
	}

	public void setType(MmochatGangSkillType type) {
		this.type = type;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public void addLevel() {
		level++;
		level = Math.min(level, type.getMaxLevel());
	}

	public void desLevel() {
		level--;
		if (level < 0) {
			level = 0;
		}
	}
}
